package org.wzy.design.patterns.prototype.simple;

import java.util.ArrayList;

public class Prototype implements Cloneable {
	
	private ArrayList<String> arrayList = new ArrayList<String>();
	
	@SuppressWarnings("unchecked")
	protected Object clone() throws CloneNotSupportedException {
		Prototype prototype = null;
		try {
			prototype = (Prototype) super.clone();
			prototype.arrayList = (ArrayList<String>) arrayList.clone();
		} catch (Exception e) {
			e.printStackTrace();
		}
		
		return prototype;
	}
}
